package com.briup.es.domain.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.PastOrPresent;
import java.time.LocalDate;

/**
 * 用户注册时，使用的数据传输实体
 */
@Data
public class RegisterUserDto {
    @NotBlank(message = "用户名不能为空")
    private String username;
    @NotBlank(message = "密码不能为空")
    private String password;
    private Integer gender;
    private String phone;
    private String avatar;
    // 2024-12-23
//    @JsonFormat(pattern = "yyyy-MM-dd")
    @PastOrPresent(message = "出生日期不能晚于当前时间")
    private LocalDate birthday;
}
